@kshegunov
Is append() not safe to call while using an iterator on the same list?
Nope. Append can (and often will) realloc to accommodate the new elements, so the old memory gets invalidated. Since you use a mutable iterator, can't you use that to append to the list?
Thank you so much! I wasn't sure that was possible. I guess I missed that in the documentation.
For those who might have the same problem or are looking to do the same thing with a TextEdit field:
instead of using append, I used QMutableStringListIterator::insert().